package com.taxshare.seller.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.taxshare.mybatis.entity.BaseEntity;
import com.taxshare.seller.constant.table.TableConstant;
import com.taxshare.tools.util.UUIDUitl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @author YANG
 * @date 2021/3/25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(TableConstant.T_SELLER_INVOICE)
@ApiModel(description = "发票")
public class SellerInvoiceEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("uuid")
    @ApiModelProperty("主键")
    private String uuid;

    @TableField("serial_no")
    @ApiModelProperty("发票请求流水号")
    private String serialNo;

    @TableField("invoice_type")
    @ApiModelProperty("发票类型（004 专票 007 普票  026 电子发票 41卷票）")
    private String invoiceType;

    @TableField("make_invoice_type")
    @ApiModelProperty("开票类型（0 蓝票  1红票）")
    private String makeInvoiceType;

    @TableField("appid")
    @ApiModelProperty("开票appid(盘开)")
    private String appid;

    @TableField("app_secret")
    @ApiModelProperty("电票appSecret")
    private String appSecret;

    @TableField("invoice_code")
    @ApiModelProperty("发票代码")
    private String invoiceCode;

    @TableField("invoice_no")
    @ApiModelProperty("发票号码")
    private String invoiceNo;

    @TableField("invoice_date")
    @ApiModelProperty("开票日期")
    private String invoiceDate;

    @TableField("qr_code")
    @ApiModelProperty("二维码")
    private String qrCode;

    @TableField("cipher_text")
    @ApiModelProperty("密文")
    private String cipherText;

    @TableField("pan_no")
    @ApiModelProperty("盘编号")
    private String panNo;

    @TableField("purchaser_name")
    @ApiModelProperty("购方名称")
    private String purchaserName;

    @TableField("purchaser_tax_no")
    @ApiModelProperty("购方税号")
    private String purchaserTaxNo;

    @TableField("purchaser_address_tel")
    @ApiModelProperty("购方地址电话")
    private String purchaserAddressTel;

    @TableField("purchaser_bank_account")
    @ApiModelProperty("购方银行账号")
    private String purchaserBankAccount;

    @TableField("purchaser_code")
    @ApiModelProperty("购方代码")
    private String purchaserCode;

    @TableField("seller_name")
    @ApiModelProperty("销方名称")
    private String sellerName;

    @TableField("seller_tax_no")
    @ApiModelProperty("销方税号")
    private String sellerTaxNo;

    @TableField("seller_address_tel")
    @ApiModelProperty("销方地址电话")
    private String sellerAddressTel;

    @TableField("seller_bank_account")
    @ApiModelProperty("销方银行账号")
    private String sellerBankAccount;

    @TableField("seller_code")
    @ApiModelProperty("销方代码")
    private String sellerCode;

    @TableField("total_sum")
    @ApiModelProperty("合计金额")
    private String totalSum;

    @TableField("total_tax")
    @ApiModelProperty("合计税额")
    private String totalTax;

    @TableField("total_sum_tax")
    @ApiModelProperty("价税合计")
    private String totalSumTax;

    @TableField("discount_sum")
    @ApiModelProperty("折扣金额")
    private String discountSum;

    @TableField("discount_tax")
    @ApiModelProperty("折扣税额")
    private String discountTax;

    @TableField("discount_sum_tax")
    @ApiModelProperty("折扣价税合计")
    private String discountSumTax;

    @TableField("remark")
    @ApiModelProperty("备注")
    private String remark;

    @TableField("payee")
    @ApiModelProperty("收款人")
    private String payee;

    @TableField("reviewer")
    @ApiModelProperty("复核人")
    private String reviewer;

    @TableField("drawer")
    @ApiModelProperty("开票人")
    private String drawer;

    @TableField("invoice_state")
    @ApiModelProperty("发票状态（0 正常  1作废 2 红冲）")
    private String invoiceState;

    @TableField("make_invoice_state")
    @ApiModelProperty("开票状态（0 待开 1发送开票 2已开 3 开票失败）")
    private String makeInvoiceState;

    @TableField("print_state")
    @ApiModelProperty("打印状态（0 未打印 1已打印）")
    private String printState;

    @TableField("data_source")
    @ApiModelProperty("数据来源 0-财税平台 1-明源")
    private String dataSource;

    @TableField("old_invoice_code")
    @ApiModelProperty("原发票代码")
    private String oldInvoiceCode;

    @TableField("old_invoice_no")
    @ApiModelProperty("原发票号码")
    private String oldInvoiceNo;

    @TableField("red_info_no")
    @ApiModelProperty("红字申请编号")
    private String redInfoNo;

    @TableField("invoice_record_no")
    @ApiModelProperty("开票记录号")
    private String invoiceRecordNo;

    @TableField("make_invoice_mode")
    @ApiModelProperty("开票方式（0 金税盘 1税控盘 2税神通 3电子发票平台 4简易税控盘 5-A9）")
    private String makeInvoiceMode;

    @TableField("order_no")
    @ApiModelProperty("结算单编号")
    private String orderNo;

    @TableField("order_time")
    @ApiModelProperty("结算单时间")
    private String orderTime;

    @TableField("check_code")
    @ApiModelProperty("校验码")
    private String checkCode;

    @TableField("phone")
    @ApiModelProperty("手机号")
    private String phone;

    @TableField("mail_box")
    @ApiModelProperty("邮箱")
    private String mailBox;

    @TableField("invoice_url")
    @ApiModelProperty("发票下载地址")
    private String invoiceUrl;

    @TableField("tax_rate")
    @ApiModelProperty("税率")
    private String taxRate;

    @TableField("invoice_month")
    @ApiModelProperty("发票日期月份：如:2019-01")
    private String invoiceMonth;

    @TableField("invoice_day")
    @ApiModelProperty("发票日期天：如：2019-01-01")
    private String invoiceDay;

    @TableField("fail_reason")
    @ApiModelProperty("失败原因")
    private String failReason;

    @TableField("now_sid")
    @ApiModelProperty("用于查询发票结果的sid")
    private String nowSid;

    @TableField(exist = false)
    private List<SellerInvoiceDetailEntity> invoiceDetail;

    //大写
    @TableField(exist = false)
    private String capitalTotalSumTax;

    @ApiModelProperty("商品编码简称标志")
    @TableField(exist = false)
    private String spbmjcbz;

    @TableField(exist = false)
    private String fplx;

    @TableField(exist = false)
    @ApiModelProperty("红字发票冲红原因代码")
    private String chyyDm;

    @TableField("doc_id")
    @ApiModelProperty("明源单据ID")
    private String docId;

    @TableField(exist = false)
    private String REQBILLNO;

    @TableField(exist = false)
    private String sellerApplyReason;

    @TableField("project_max")
    @ApiModelProperty("一级项目名称")
    private String projectMax;

    @TableField("project_code_max")
    @ApiModelProperty("一级项目编码")
    private String projectCodeMax;

    @TableField("room")
    @ApiModelProperty("购买房间")
    private String room;

    @TableField("print_time")
    @ApiModelProperty("打印次数")
    private Integer printTime;

    @TableField("list_flag")
    @ApiModelProperty("是否为清单标识 0 非清单发票 1 清单发票")
    private String listFlag;

    @TableField("tax_authority")
    @ApiModelProperty("主管税务机关")
    private String taxAuthority;

    @TableField("tax_authority_code")
    @ApiModelProperty("主管税务机关代码")
    private String taxAuthorityCode;


    @TableField("seller_deposit_bank")
    @ApiModelProperty("销方开户银行")
    private String sellerDepositBank;

    @TableField("seller_address")
    @ApiModelProperty("销方地址")
    private String sellerAddress;

    @TableField("seller_phone")
    @ApiModelProperty("销方电话")
    private String sellerPhone;

    @TableField("tax_voucher_no")
    @ApiModelProperty("完税凭证号码")
    private String taxVoucherNo;

    @TableField("company_tax_number")
    @ApiModelProperty("子公司税号")
    private String companyTaxNumber;

    @TableField("fwcqzshm")
    @ApiModelProperty("房屋产权证书/不动产权证号码")
    private String fwcqzshm;

    @TableField("bdcdz")
    @ApiModelProperty("不动产地址")
    private String bdcdz;

    @TableField("bdcxxdz")
    @ApiModelProperty("不动产详细地址")
    private String bdcxxdz;

    @TableField("zlqq")
    @ApiModelProperty("租赁期起")
    private String zlqq;

    @TableField("zlqz")
    @ApiModelProperty("租赁期止")
    private String zlqz;

    @TableField("kdsbz")
    @ApiModelProperty("Y：是，N：否跨地市标志")
    private String kdsbz;

    @TableField("mjdw")
    @ApiModelProperty("面积单位")
    private String mjdw;

    @TableField("isShowGfDzdh")
    private String isShowGfDzdh;
    @TableField("isShowGfYhzh")
    private String isShowGfYhzh;
    @TableField("isShowXfDzdh")
    private String isShowXfDzdh;
    @TableField("isShowXfYhzh")
    private String isShowXfYhzh;
    @TableField("specificlnvoiceType")
    private String specificlnvoiceType;
    @TableField("accountNumber")
    private String accountNumber;
}
